package com.kaifamiao.www.demo.D0719;

import java.util.Scanner;

public class De08 {
    public static void main(String[] args) {
        int[] num = new int[]{1,2,3,4,5,6,7};
        System.out.println("从以下数字中选择输入的数字");
        System.out.println("1,2,3,4,5,6,7" );
        Scanner sc = new Scanner(System.in);
        int j = sc.nextInt();
        for (int i = 0;i < num.length;i++){
            if(num[i] == j){
                System.out.println("这个数字在第"+(i+1)+"位");
            }
        }
    }
}
